<template>
    <!--页面已废弃或已注释-->
    <div class="page-setting">
        <van-nav-bar class="help-tilte" left-arrow :fixed="true" title="Settings" @click-left="$router.back(-1)">
        </van-nav-bar>
        <div style="padding: 23px;"></div>
        <div class="settings">
            <div v-if="getAndroid()" class="version">
                <van-cell-group>
                    <van-cell title="单元格" is-link value="内容" />
                </van-cell-group>
            </div>
            <div class="settings-list" @click="$router.push('/help/terms')" style="border-top: 0 solid transparent;">Terms of Use</div>
            <div class="settings-list" @click="$router.push('/help/policy')">Privacy policy</div>
        </div>
    </div>
</template>
<script>
    import {getShopVersion} from '../../static/api/mgc_api'
    import Qs from 'qs'
    export default {
        name: 'Settings',
        data() {
            return {
                version: ''
            };
        },
        methods: {
            getAndroid() {
                let ts = false
                if (window.android) {
                    return ts = true
                }
            },
            getVersion() {
                getShopVersion().then((res) => {
                    if (res.data) {
                        if (res.data.errorID === 0) {
                          this.version = res.data
                        } else {
                            this.$toast(res.data.message)
                        }
                    }
                })
                    .catch((error) => {
                        console.log(error)
                        this.$toast('No internet, please try again')
                    })
            }
        },
        mounted() {
            if (window.android) {
                // this.getVersion();
            }
        }
    }

</script>
<style>
    .page-setting .van-nav-bar{
        background-color: #FF9900;
        color: #fff;
    }
    .page-setting .van-nav-bar .van-icon{
        color: #fff;
        margin-right: 15px;
        font-size: 18px;
    }
    .page-setting .van-list__loading{
        width: 100%;
        /*border-top: 1px solid #F2F2F2;*/
    }
</style>
<style scoped>
    .settings-list{
        width: 100%;
        display: flex;
        padding: 8px 15px;
        box-sizing: border-box;
        line-height: 24px;
        position: relative;
        background-color: #fff;
        color: #333;
        font-size: 14px;
        overflow: hidden;
        border-bottom: 1px solid #e5e5e5;
    }
    .version {
        border-bottom: 16px solid #F2F2F2;
    }
</style>
